<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <ol>
        <li v-for="(todo,index) in todos" :key="todo.id">{{index}} === {{todo.id}} ==== {{ todo.name }}</li>
      </ol>
    </div>
  </body>
</html>
<script src="../js/vue.js"></script>
<script>
  const app = new Vue({
    el: "#app",
    data: {
      todos: [
        {
          id: 1,
          name: "吃饭",
        },
        {
          id: 2,
          name: "睡觉",
        },
        {
          id: 3,
          name: "打游戏",
        },
      ],
    },
  });
</script>
